package syllabus.service.impl;

import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import syllabus.dao.PGroupMapper;
import syllabus.model.Criteria;
import syllabus.model.PGroup;
import syllabus.service.PGroupService;

@Service
public class PGroupServiceImpl implements PGroupService {
    @Autowired
    private PGroupMapper pGroupMapper;

    private static final Logger logger = LoggerFactory.getLogger(PGroupServiceImpl.class);

    public int countByExample(Criteria example) {
        int count = this.pGroupMapper.countByExample(example);
        logger.debug("count: {}", count);
        return count;
    }

    public PGroup selectByPrimaryKey(Integer id) {
        return this.pGroupMapper.selectByPrimaryKey(id);
    }

    public List<PGroup> selectByExample(Criteria example) {
        return this.pGroupMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(Integer id) {
        return this.pGroupMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(PGroup record) {
        return this.pGroupMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(PGroup record) {
        return this.pGroupMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(Criteria example) {
        return this.pGroupMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(PGroup record, Criteria example) {
        return this.pGroupMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(PGroup record, Criteria example) {
        return this.pGroupMapper.updateByExample(record, example);
    }

    public int insert(PGroup record) {
        return this.pGroupMapper.insert(record);
    }

    public int insertSelective(PGroup record) {
        return this.pGroupMapper.insertSelective(record);
    }
}